package com.h3c.ptability.support.event.listener;

import com.h3c.ptability.service.IPtWaitSignInfoService;
import com.h3c.ptability.support.event.EventElement;
import com.h3c.ptability.support.event.FillWaitSignEvent;
import lombok.AllArgsConstructor;
import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author chenyifan
 * @date 2022/10/24 15:25
 */
@Component
@AllArgsConstructor
public class FillWaitSignListener {


    private final IPtWaitSignInfoService ptWaitSignInfoService;

    @Order
    @EventListener(FillWaitSignEvent.class)
    public void fillWaitSignRecordId(FillWaitSignEvent event) {
        ptWaitSignInfoService.fillRecordId((EventElement) event.getSource());
    }
}
